package lista;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;


public class LiczbaTest {

	Liczba licz = null;
	
	@Before
	public void setUp() throws Exception {
		licz = new Liczba ();
	}

	@After
	public void tearDown() throws Exception {
	}

	public void test() {
		assertEquals (licz.zamiana(5, 2), "101");
	}
	
	
	@Ignore @Test (timeout = 500)
	public void test2() {
		for (int i = 2; i <= 1000000000; i++) {
			//if (i >= 9) fail ("system ponad 16");
			if (i < 2) fail ("system poniżej 2");
			licz.zamiana(5*i, 2);
		}
	}
	
	@Test (expected = ArithmeticException.class)
	public void testZero () {
		licz.zamiana(100, 0);
	}

}
